'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller, ctx } = app;
  var log = app.middleware.logged(ctx);
  router.get('/test', controller.home.index);
  router.post('/web/getlist', controller.web.index);
  router.post('/web/info', controller.web.info);
  //wx
  //微信首页集合接口
  router.post('/home/index', controller.wx.index);
  router.post('/api/login', controller.web.login);
  router.get('/api/menu', controller.web.getmenu);
  router.get('/api/journal', log, controller.web.journal);
  router.post('/api/uploads/index', controller.uploads.index);
  router.post('/api/goods/create', controller.web.increaseGoods);
  router.post('/api/goods/get', controller.web.getGoods);





  router.get('/api/trade/get', controller.trade.get);
  router.post('/api/trade/add', controller.trade.add);










};
